package com.gomoney.auth;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableAuthorizationServer;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;
import org.springframework.transaction.annotation.EnableTransactionManagement;


@EnableTransactionManagement
@EnableDiscoveryClient
@SpringBootApplication
@EnableAuthorizationServer //开启授权服务器
@EnableResourceServer // 变成资源服务器 不是资源服务器之前，访问资源服务器以后，可以跳过登录，直接带上token就可以直接访问了
@EnableGlobalMethodSecurity(prePostEnabled = true) // 开启方法级别的验证*/
@EnableRedisHttpSession
public class AuthApplication {
    public static void main(String[] args) {
        SpringApplication.run(AuthApplication.class, args);
    }
}


